package com.example.day07;

public class BookTest {

    public static void main(String[] args) {
        Book  b1=new Book(1,"一",123.5);

        BookInfo bookInfo=new BookInfo(100,"一对一");
        b1.setBookInfo(bookInfo);

        Book  b2=new Book(1,"一",123.5);
        BookInfo bookInfo1=new BookInfo(100,"一对多");

        System.out.println(b1==b2);//false


        System.out.println(b1.equals(b2)); //true

        System.out.println(b1.getClass());
        System.out.println(b2.getClass()==b1.getClass());


        System.out.println("=====================");
        String  s1=new String("abc");
        String s2=new String("abc");
        System.out.println(s1==s2);
        System.out.println(s1.equals(s2));

    }
}
